<?php
$control->renderView('weChatShare');
//获取当前user信息
$userCooker = new BAUserCooker();
$userInfo = $userCooker->getUserInfo();
//var_dump($userInfo);
$familyNameAttr = '';
$surNameAttr = '';
if ($userInfo->getItem('familyName') != NULL)
    $familyNameAttr = $userInfo->getItem('familyName')->getValue();
if ($userInfo->getItem('surName') != NULL)
    $surNameAttr = $userInfo->getItem('surName')->getValue();
?>
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl . '/css/BWeMember/wei_webapp_new.css' ?>">
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl . '/css/BWeMember/wei_dialog.css' ?>">
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl . '/css/BWeMember/common.css' ?>">

<!-- ajax加载页面时弹出加载旋转gif图 -->
<style>
    #ajax-loaderdiv {position: fixed;top: 0;left: 0;width: 100%;height: 100%;z-index: 35000;background-color: rgba(0, 0, 0, 0.3);display: none;}
    .ajax-loader {position: absolute;left: 50%;top: 50%;margin-left: -16px;margin-top: -16px;display: block;}
</style>
<div id="ajax-loaderdiv" style="display: none;">
    <img src="<?php echo Yii::app()->request->baseUrl . '/images/ajax-loader.gif' ?>" class="ajax-loader">
</div>


<div id="page_card" class="div-body">

    <div id="mappContainer">
        <div class="inner root" style="height: 519px;">
            <div class="card" style="background:url(<?php echo Yii::app()->request->baseUrl . '/images/BWeMember/wei_webapp_new/card_bk_1.png' ?>) no-repeat 0 0;-webkit-background-size:267px 159px;background-size:267px 159px;" data-card-type="0">
                <img src="<?php echo Yii::app()->request->baseUrl . '/images/BWeMember/weixin_shop_logo/2543529110_card_170_170.png' ?>" class="logo">
                <h1></h1>
                <strong class="pdo verify">
                    <span style="color:#92714e;text-shadow:0 1px #f1e7dc;"><em style="color:#92714e;text-shadow:0 1px #f1e7dc;">会员名</em><?php echo $familyNameAttr . $surNameAttr; ?></span>
                </strong>
            </div>
            <p><span>我的消费记录</span></p>
            <div style="display: block;margin-bottom: 30px;">
                <span style="float:left;margin-left: 12px;">消费金额(元)</span><span style="float:right;margin-right: 100px;">消费时间</span></div>
            <ul class="round" id="additional">
                <?php
                foreach ($billView as $id => $list) {
                    ?>
                    <?php
                    $ajaxScript = $control->getAjaxScript('showBillInMobile', array(
                        'cooker' => 'BAWeBill@showBill',
                        'billId' => $id,
                    ));
                    ?>
                    <li style="height: 50px;" onclick="<?php echo $ajaxScript ?>">

                        <a class="record" href="#" style="float: left;background-size: 0px;" > <?php if ($list->getItem('amount') != NULL) echo $list->getItem('amount')->getValue(); ?> </a>
                        <a class="record" href="#" style="float: right;padding-right: 40px;" ><?php if ($list->getItem('billTime') != NULL) echo date('Y/m/d H:i', ($list->getItem('billTime')->getValue())); ?></a>
                    </li>
                <?php }
                ?>
            </ul>
            <?php
            $returnUrl = $control->getAjaxScript('返回会员卡页', array(
                'cooker' => 'BAMemberCard@showUserCardHome',
            ));
            ?>
            <div class="footFix" id="footReturn"><a  href="javascript:void(0)" onclick="<?php echo $returnUrl; ?>"><span>返回会员卡页</span></a></div>
        </div>
    </div>

<!--    <div id="mCopyright">
        <div class="mcrInn">
            <h1>比邻平台</h1>
        </div>
    </div>-->

</div>
